<?php
namespace Home\Controller;
use Think\Controller;
class NewsController extends Controller {
    public function index(){


    	  $page = $_REQUEST['p'] ? $_REQUEST['p'] : 1;
          $pageSize =3;
          $news = D("News")->getNews($conds,$page,$pageSize);
          $count = D("News")->getNewsCount($conds);
         $res  =  new \Think\Page($count,$pageSize);
         $pageres = $res->show();
        $this->assign('pageres',$pageres); 
    	$this->assign('news', $news);
        $this->display();
    }

}